//
// Copyright (C) [2024] Xingyun Integrated Circuit, Inc.
//
// GreenCode was a private technology asset of Xingyun Integrated Circuit， Inc （Confidential）
//  Author: Shawn.Tan
//  Date : 2025.10.28
//
//  History : Initial Version 2025.10.28
//
//
#include "FrontEndCall.h"

#include "PyInterface.h"

/*!
  \ file FrontEndCall.cc
  \ brief call for call functions on front end
*/

namespace Green {

  FrontEndCall* FrontEndCall::mspFrontEnd = nullptr;

  void FrontEndCall::Initialize()
  {
    if (nullptr == mspFrontEnd) {
      mspFrontEnd = new FrontEndCall();
    }
  }

  void FrontEndCall::Destroy()
  {
    delete mspFrontEnd;
    mspFrontEnd = nullptr;
  }

  uint32 FrontEndCall::CallBackTemplate(uint32 threadId, ECallBackTemplateType callBackType,  const std::string& primaryValue, const std::map<std::string, uint64>& callBackValues )
  {
    return mpPyInterface->CallBackTemplate(threadId, callBackType, primaryValue, callBackValues);
  }

}
